From 2fa1a0a651a979c894c001bbaf2b2911b800a45d Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 24 May 2019 10:59:38 +0000 Subject: [PATCH] wayland: Disconnect the frame clock The frame clock can survive the surface now, so we need to disconnect. --- gdk/wayland/gdksurface-wayland.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c index f7bd5c9f9d..0d1f1ba584 100644 --- a/gdk/wayland/gdksurface-wayland.c +++ b/gdk/wayland/gdksurface-wayland.c @@ -2819,6 +2819,7 @@ gdk_wayland_surface_destroy (GdkSurface *surface, gboolean foreign_destroy) { GdkWaylandDisplay *display; + GdkFrameClock *frame_clock; g_return_if_fail (GDK_IS_SURFACE (surface)); @@ -2829,6 +2830,10 @@ gdk_wayland_surface_destroy (GdkSurface *surface, gdk_wayland_surface_hide_surface (surface); + frame_clock = gdk_surface_get_frame_clock (surface); + g_signal_handlers_disconnect_by_func (frame_clock, on_frame_clock_before_paint, surface); + g_signal_handlers_disconnect_by_func (frame_clock, on_frame_clock_after_paint, surface); + display = GDK_WAYLAND_DISPLAY (gdk_surface_get_display (surface)); display->toplevels = g_list_remove (display->toplevels, surface); } -- 2.30.2